package com.travel.server.manager.impl.controller;

import com.travel.server.manager.api.IQuestionService;
import com.travel.server.manager.dto.request.EmptyRequest;
import com.travel.server.manager.dto.request.PageRequest;
import com.travel.server.manager.dto.request.question.DeleteQuestionRequest;
import com.travel.server.manager.dto.request.question.QueryQuestionDetailRequest;
import com.travel.server.manager.dto.request.question.UpdateQuestionRequest;
import com.travel.server.manager.impl.controller.base.AbstractController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: LiZhenhui
 * @Date: 2018/10/17 16:45
 * @Desc:
 */
@RestController
@Slf4j
public class QuestionController extends AbstractController implements IQuestionService {
    @Override
    public Object queryQuestionList(@RequestBody PageRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object deleteQuestion(@RequestBody DeleteQuestionRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object updateQuestion(@RequestBody UpdateQuestionRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryQuestionDetail(@RequestBody QueryQuestionDetailRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryQuestionEnum(@RequestBody EmptyRequest request) {
        return this.getCommand().handle(request);
    }
}
